ShellInitCmd Directive

Defines the first command written into the shell startup jacket script.

Purpose

The ShellInitCmd directive specifies the first command written into the startup jacket script. Typically, this is a command that disables shell command echo, so that the commands being executed don't appear in the output of the script. You can use this to make httpd generate the startup script in a language other than DOS COMMAND.COM's shell language. For interpreters such as perl or icon, this wouldn't be needed and may simply be defined as a comment in the interpreter's language.

Use your imagination. Since this appears first in every script executed by httpd, you could use it for things like a "require" statement in perl, or for controlling things like debugging modes, etc., on a global basis for all scripts. Or you could use it to output a "standard" document header of some sort. Note that this would apply to all scripts executed by your server.


Syntax

ShellInitCmd command

where command is the initial command issued to your shell.

Only one ShellInitCmd directive is allowed in the configuration file.


Default

If you do not specify a ShellInitCmd, httpd assumes:

ShellInitCmd @ECHO OFF, as needed by most DOS shells to prevent command echo from appearing in the output.


Examples

ShellInitCmd #
might be used as a no-op if you were exec-ing perl, and
ShellInitCmd OPEN ENVIRON$("OUTPUT_FILE") FOR OUTPUT AS #1
might be used with a BASIC interpreter that couldn't handle command line output redirection to open the output file so that you wouldn't have to do that inside all of your scripts.

Return to Wizard Scripting Overview


Robert B. Denny <rdenny@netcom.com>